Super Mario 63 LD Guide 3 Code
Designing Your Level|TopPage=Super Mario 63 LD Guide Table Of Contents|NextPage=Super Mario 63 LD Guide 4 Lists Code Translation Lists}} =Code Details: Intro= Original research by Superyoshi. Updated by You may be asking yourself, "Why do I need to know about the code if there's a graphical interface?" The answer is that there are so many more cool things that you can do, if you know how to edit the code directly. Section 5, Tricks & Glitches details all of the cool things you can do by editing the code directly in certain ways. This section will give you the info you need to understand how and where to use the tricks you'll be reading about, and also why they happen (and maybe you can use this to figure out new tricks and glitches of your own). The way this section is organized is by walking you through the process of writing a level from scratch. The sections are laid out logically, but the examples flow along in order. Examples are colored the same as the section. The way this all works is fairly simple, but you have to pay attention and be careful. Follow the guide in this page all the way through, and you will know how to build levels from scratch in Notepad as well as Suyo and Runouw himself. Good luck. =Structure= Basic Code Format: ~ ~ )]}}~ The code for each level is split into 4 sections separated by tilde(~) characters. *Level Size *Tiles *Items *Course Settings The level size is the size of the tile grid, measured in tiles. The smallest grid possible is 25 tiles wide by 17 tiles tall, and the largest grid is 999x999 (though there isn't a computer in the world that would be able to load it, yet). The default size of the grid (for example, if the "Reset Course" Option in the menu is chosen) is 50x30. ~ The Tiles Section contains all of the Tiles in the level. They are shown in a grid in the graphical interface, but in the code they are listed in columns, starting at the top-left of the level, and continuing down each column and to the right across the level. table on TILEIDs on the next page. Keeping all of this in mind, we move on...}} There are two ways to make a tile. *Single Tile *Tile With Multiplier Single Tile The single tile is simply entered as the TILEID, and nothing else. ~ ~ Tile With Multiplier Placing more than one tile at a time requires the Tile With Multiplyer notation. This consists of the TILEID and a MULT surrounded by asterisks (*) like this: TILEID*MULT* This is most important with empty space, as it is necesary for empty levels and the END of the Tiles Section. ~ ~ ~ ~ End of Tile Section The END of the Tile Section is taken up with the number of remaining empty tiles in the level. This will be in the format of a Tile With Multiplyer of Empty Tiles: 0*MULT* ~ ~ ~ The Items Section contains all of the Items in the level. Items are placed on the same grid as tiles are, but have more freedom. ) is introduced as an end marker character for specifying where the code for one item ends and the next begins.}} All items start the same, with their SPRITEID, XPOS, and YPOS, one after the other, separated by commas, with no spaces in between parameters. All other settings are added in the same way, with commas and no spaces. There is only one required item, and that is the Start Position. table on SPRITEIDs on the next page). The SPRITEID of 1 Start Position happens to be 1, and it only takes a few settings. The settings common to all Items are of XPOS and YPOS, and they are simply the coordinates on the grid for the center of the item. The three other settings that this particular item takes are Xspeed, Yspeed and Direction. Xspeed and Yspeed are what they sound like - it's true, you can start the level moving. Just remember the pixel grid we're dealing with - Postitive X is to the right and negative X to the left, and positive Y is down and negative Y is up. Direction is another very common setting that just determines whether the item is "facing" right or left (the dialogs for some items list this as "Mirror").}} Individual Sprite Syntax List on the next page for more info), so putting it all together, and we have 1,0,416,0,0,Right. Remember the tilde to signify that we are starting the Items Section, and then put that at the end of our code, and it looks like this:}} ~ ~ ~ ~ 6,96,416}} The Course settings consist of the IDs for the Music (MUSICID) and Background (BGID), and the name of the level. All parameters are separated with the Tilde (~) character and have no spaces between them. Level names are limited to 32 characters, and can consist of any ASCII character. anywhere else in this guide, you already know that it is a hexadecimal representation of letters, numbers, and symbols, consisting of the percent symbol and two hex digits, and that the LD code uses it for any character that isn't a letter or number. What this means is that you need to look up things as simple as spaces and periods in something like the Super Mario 63 LD Guide 4 Lists#ASCII List ASCII Codes List. For this example, we'll just use space, which happens to be %20. That takes the place of the space in the level name, giving us "My%20Level".}} ~ ~ 6,96,416}}~ =Conclusion= So, from our initial structure of: ~ ~ )]}}~ We get our final level of: ~ ~ 6,96,416}}~ Go ahead. Paste it into the LD. It works. Congratulations! You are now a Code Master. Go forth and design levels! If you came here first, you might want to check the Designing a Level section for some more specific info on designing a level using the graphic interface of the LD. You can also check out the Focused Guides, and Tricks & Glitches for more in-depth coverage of good practices and general level design theory. The next page has tables of info on the variables used by the LD. Have fun! Designing Your Level|TopPage=Super Mario 63 LD Guide Table Of Contents|NextPage=Super Mario 63 LD Guide 4 Lists Code Translation Lists}} Category:Game Category:Guide Category:SM63 Category:LD